﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using log4net;
using DWH.Utils;
using DWH.Data;
using DWH.Configuration;
using DWH.PP.LoopUrls;
using System.Collections.Concurrent;

namespace DWH.PP.Push
{
    public class PageAttachmentFromDBRecordPushTask : PPTaskBase
    {
        protected string TargetPullTaskName;
        protected string TargetPullTaskAssemblyFile;
        protected string TargetPullTaskTypeName;
        protected int MaxTryPushRound;

        private ILog logger;

        public override void Initialize()
        {
            logger = LogManager.GetLogger(typeof(PageAttachmentFromDBRecordPushTask));

            InitializeTaskInfoFromDB();            
        }

        public override void Run()
        {
            
            BlockingCollection<string> a = new BlockingCollection<string>();

            //consumer constructer 
            
            while (true)
            {
                //take 100;
                a.Add("");

                if (a.Count == 0)
                { 
                
                }

            }

        }

        public void PullNewItemsFromDB(BlockingCollection<string> collection)
        {
            collection.Add("");
        }

        public override void Reset()
        {

        }
    }
}
